<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<?php
		session_start();
		$acceso=$_SESSION['pediatria_acceso'];
		if($acceso==1 ||$acceso==2){//solo tendra acceso el administrador y secretaria

	?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
    include 'class/ORMDoctor.php';
    include_once 'class/ORMCita.php';
 
?>
<html>
    <head>
        <title>Pediatr&iacute;a</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <link href="css/style.css" rel="stylesheet" type="text/css">
        <link type="text/css" href="css/menu.css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript" src="js/menu.js"></script>
        <script type="text/javascript" src="js/buscar.js"></script>
        
        <link type="text/css" href="css/start/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
        <script type="text/javascript">
            $(function() {
                $('input[type="button"]').button();
                $("#txtFecha").datepicker();
                $("#txtFecha").datepicker("option", "dateFormat","yy-mm-dd");
                $("#txtFechaNuevaCita").datepicker();
                $("#txtFechaNuevaCita").datepicker("option", "dateFormat","yy-mm-dd");

            });
        </script>
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
        <table width="100%" height="100%" border="0" style="vertical-align: top" align="center" cellpadding="0" cellspacing="0">
            <tr><!- encabezado ->
                <?php
                include("content/encabezado.php");
                ?>
            </tr><!-  FIN encabezado ->
            <tr><!-  INICIO MENU ->
                <td height="75" background="images/top02bg_1.gif" style="margin-bottom: 0;background-repeat: repeat-x; vertical-align: top;">
                    <br/>
                    <?php
                    include("content/menu.php");
                    ?>
                </td>
            </tr><!-  FIN MENU ->
            <tr>
                <td align="center" valign="top" bgcolor="F8FFE9">
                    <table style="min-width: 600px" height="100%" border="0" cellpadding="0" cellspacing="0" class="text" align="center">
                        <tr>
                            <td width="539" align="left" valign="top">
                                <table width="650" border="0" height="100%" cellpadding="0" cellspacing="0" class="text">

                                    <tr>
                                        <td align="center" valign="top" bgcolor="F8FFE9" height="100%">
                                            <!- INicio de contenido->
                                            <div style="padding: 10px" >
                                                <h1 align="center">Editar Cita</h1><br/>
                                                <h3 align="left">Datos del paciente</h3>
                                                <hr><br/><div id="2">
                                                    <table border='0' width='100%'>
                                                    <?php
                                                    $cita = $_GET["cita"];
                                                    $expe= $_GET["expediente"];
                                                    $nombre= $_GET["nombre"];
                                                    $ident = $_GET["identificacion"];
                                                   

                                                    echo"
                                                    <tr>
                                                        <td><label>No. Cita</label></td><td><input type='text' disabled readonly='true' id='cita' value=$cita></td>
                                                    </tr>
                                                    <tr>
                                                        <td><label>No. expediente</label></td><td><input type='text' disabled readonly='true' id='expediente' value=$expe></td>
                                                    </tr>
                                                    <tr>
                                                        <td><label>Nombre completo</label></td><td><input type='text' disabled readonly='true' id='nombreCompleto' value=$nombre ></td>
                                                    </tr>
                                                    <tr>
                                                        <td><label>Identificaci&oacute;n:</label></td><td><input type='text' disabled readonly='true' id='identidad' name='identidad' value=$ident></td>
                                                    </tr>";
                                                ?>

                                                </table></div>

                                                &nbsp;<br/>
                                                <h3 align="left">Asignar Cita</h3>
                                                <hr><br/>
                                                 <table width="100%" border="0">
                                                       <?php
                                                            $OrmDoc = new ORMDoctor();
                                                            $queryOrmDoc;
                                                            $queryOrmDoc = $OrmDoc->obtenerNombreDoctor();
                                                            $hora = $_GET["hora"];
                                                            $doctor = $_GET["doctor"];

                                                            echo"
                                                                <tr><td><label>Doctor:</label></td><td><select id='Doctor' onclick=''>
                                                                <option>---</option>";
                                                            while ($row = mysql_fetch_row($queryOrmDoc)) {
                                                                echo "<option value='$row[5]'>$row[5]</option>";
				}
                                                            echo"</select></td></tr> "?>
                                                                <tr><td><label>Hora:</label></td><td><select id='Hora' >
                                                                <option>---</option>
                                                                <option>7:00 am</option>
                                                                <option>8:00 am</option>
                                                                <option>9:00 am</option>
                                                                <option>10:00 am</option>
                                                                <option>11:00 am</option>
                                                                <option>12:00 m</option>
                                                                <option>1:00 pm</option>
                                                                <option>2:00 pm</option>
                                                                <option>3:00 pm</option>
                                                                <option>4:00 pm</option>
                                                                <option>5:00 pm</option>
                                                                <option>6:00 pm</option>
                                                                <option>7:00 pm</option>
                                                                </select></td><td></tr> 
                                                    <tr><td><label>Fecha:</label></td><td><input type='text' id='txtFechaNuevaCita'/></td></tr>
                                                    <tr><td><label>Observaciones:</label></td><td><textarea rows='3'  cols='40'></textarea></td></tr>
                                                    <tr><td align='left' colspan='2'><input type='button' value='Guardar' class='boton' onclick='Editar(cita.value, expediente.value, Doctor.value ,txtFechaNuevaCita.value, Hora.value)'></td></tr>
                               
                                                </table><br/><br/>


                                                <h3 align="left">Lista de citas</h3>
                                                <hr><br/>
                                                 <div id="3">
                                                <table border="0" width="100%" class="estilo_tabla">

                                                    <tr class="tr_impar">
                                                        <td colspan="7">&nbsp;</td>
                                                    </tr>
                                                    <tr class="titulo_tabla">
                                                        <td>No. expediente</td><td>Fecha/Hora</td><td>Identificaci&oacute;n</td><td>Nombre completo</td><td colspan="3">Opciones</td>
                                                    </tr>
                   
                                                </table></div>
                                                <br/><br/>

                                            </div>

                                        </td><!- FIN de contenido->
                                    </tr>
                                </table></td>


                        </tr>
                    </table></td></tr>
            <tr>

                <?php
                    include("content/pie_page.php");
                ?>

            </tr>

        </table>
        <div id="copyright" style="display: none">Copyright &copy; 2011 <a href="http://apycom.com/">Apycom jQuery Menus</a></div>

    </body>
</html>
<?php
	}else{
		header("Location: index.php");
	}
	?>